Repository navigation
fix(operator): report missing gateway CRDs instead of claiming Ready - #173
Merged
Merged
Conversation
…ming Ready LLMModel logged and skipped a failed InferencePool or AIGatewayRoute apply, then reported Ready. A missing AI Gateway or Inference Extension CRD left a model that looked healthy and returned 404 or 500 at request time, with nothing in its status to explain it. Report each apply as a condition, InferencePoolReady, ExternalEndpointReady and InternalEndpointReady, using the reasons the PassthroughModel reconciler already uses: GatewayCRDUnavailable for a missing CRD, ApplyFailed otherwise, EndpointDisabled for an endpoint the spec turned off. A failure turns Ready into Degraded and requeues the reconcile, after 15 seconds for a missing CRD or a minute otherwise. On an LLMModel the endpoint conditions cover the route only; the policies keep their own SecurityPoliciesReady condition, applied earlier in the reconcile so key revocation isn't held up while a model starts. updateStatus now sets conditions individually instead of replacing the list, so SecurityPoliciesReady survives the final status write. The shared condition constants and helpers move from the PassthroughModel controller to conditions.go. Closes #109.
dcmcand
force-pushed
the
fix/llmmodel-surface-missing-crd
branch
from
November 19, 2026 14:15
b903c01 to
2630753
Compare
|
📄 Docs preview for |
jbouder
requested changes
Nov 20, 2026
SecurityPoliciesReady is patched earlier in the reconcile and is not in the conditions phaseWithGatewayFailure checks, so a model whose routes applied but whose SecurityPolicies could not (Envoy Gateway's CRD not installed) still reported Ready. Downgrade Ready to Degraded when the policies are pending; the existing 15s requeue retries them. The missing-CRD test now checks the phase is Degraded while the CRD is missing and Ready again once it is installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #109. Rewritten on top of main: #190 landed after this was first opened and already gave SecurityPolicies their own
SecurityPoliciesReadycondition and early apply, so this version builds on that instead of folding policies into the endpoint conditions.The bug
An
LLMModelwhoseInferencePoolorAIGatewayRoutecouldn't be applied reported phaseReady. The reconciler logged the error and moved on, so the only trace was the operator log, and the visible symptom was a 404 or 500 at request time against a healthy-looking model.What changed
InferencePoolReady,ExternalEndpointReadyandInternalEndpointReadyconditions onLLMModel, with the reasons PassthroughModel already uses:GatewayCRDUnavailablefor a missing CRD,ApplyFailedotherwise,EndpointDisabledfor an endpoint switched off in the spec.LLMModelthe endpoint conditions cover the route only. The policies stay inSecurityPoliciesReady, applied before the model is serving so key revocation isn't delayed.ReadyintoDegraded(pods serve, nothing routes) and requeues: 15 seconds for a missing CRD, one minute otherwise.Pending,Downloading,StartingandErrorare left alone.updateStatussets conditions one at a time soSecurityPoliciesReadysurvives the final status write.conditionFor/disabledConditionmove from the PassthroughModel controller toconditions.go, with newgatewayRequeue,hasGatewayFailureandphaseWithGatewayFailurehelpers. PassthroughModel behavior is unchanged.architecture.mdxandconfiguration.mdxdescribe the new conditions and drop the Converge LLMModel reconciler onto the PassthroughModel gateway-apply failure handling #109 caveat.A model with broken routing that used to report
Readynow reportsDegraded. Dashboards and alerts keyed on phase will see it.How to test
cd operator && make test(withAI_GATEWAY_CRD_DIRas in CI): all packages pass.conditions_test.go: table tests forconditionFor,gatewayRequeue/hasGatewayFailure(a disabled endpoint isn't a failure; a missing CRD sets the interval) andphaseWithGatewayFailure.gateway_conditions_test.go: a fake client rejects AIGatewayRoute applies with Forbidden while policies succeed. The model goesDegradedwithApplyFailed, requeues after a minute, keepsSecurityPoliciesReady=True, and returns toReadywith all conditionsAppliedonce the failure clears.Degradedwith all three gateway conditionsGatewayCRDUnavailable, andSecurityPoliciesReadyis still present.updateStatus, dropping the requeue, or swallowing route errors each fails a test.cd docs && npm test: 31/31.